package com;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-08-22
 * Time: 19:19
 */
public class StudentDemo {
    public static void main(String[] args) {
        //创建对象 类名 对象名 = new 类名();
        Student student1 = new Student();
        student1.name = "张三";
        student1.age = 20;

        Student student2 = student1;
        student2.name = "李四";
        student2.age = 30;

        System.out.println(student1.name);
        System.out.println(student2.name);
        System.out.println(student1.age);
        System.out.println(student2.age);

    }
}
